(function (window){
    //只要给构造器函数的实例化对象身上添加属性方法，直接在函数的this上加
    function Promise(executor){
        console.log('实例化对象',this);
        //给Promise构造函数所产生的实例化对象身上添加两个属性
        this.PromiseState = 'pending'
        this.PromiseResult = undefined
        executor()
    }
    window.Promise = Promise
})(window)